<form id="signParamSubmit-form" lay-filter="signParamSubmit-form" class="layui-form model-form">
    <input name="id" type="hidden"/>
    <div class="layui-form-item">
        <label class="layui-form-label">签到时间参数</label>
        <div class="layui-input-block">
            <input id="signinTime" name="signinTime" class="layui-input" placeholder="H点m分">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">签退时间参数</label>
        <div class="layui-input-block">
            <input id="sigoutTime" name="sigoutTime" class="layui-input" placeholder="H点m分">
        </div>
    </div>

    <div class="layui-form-item model-form-footer">
        <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button>
        <button class="layui-btn" lay-filter="signParamSubmit-form-submit" lay-submit>提交</button>
    </div>
</form>

<script>
    layui.use(['form', 'table', 'util', 'config', 'index','admin','layedit'], function () {
        var form = layui.form;
        var table = layui.table;
        var config = layui.config;
        var layer = layui.layer;
        var util = layui.util;
        var index = layui.index;
        var admin = layui.admin;
        let userinfo = "";
        var layedit=layui.layedit;



        form.render();
        //获取值
        var signParam = admin.getTempData('t_signParam');

        //修改赋值
        $("#signinTime").val(signParam[0].value);
        $("#sigoutTime").val(signParam[1].value);
        form.render();
        // 表单提交事件
        form.on('submit(signParamSubmit-form-submit)', function (data) {
            layer.load(2);
            let res=[{key:'signInTime',value:data.field.signinTime},{key:'sigOutTime',value:data.field.sigoutTime}];

            console.log(res,6549847);
            admin.req('api-sign/sign/signParamUpdate', JSON.stringify(res), function (data) {
                layer.closeAll('loading');

                if (data.code == 0) {
                    layer.msg(data.msg, {icon: 1, time: 500});
                    admin.finishPopupCenter();
                } else {
                    layer.msg(data.msg, {icon: 2, time: 500});
                }
            }, "POST");
            return false;
        });
    });
</script>

<script>
    layui.use('laydate', function() {
        var laydate = layui.laydate;
        laydate.render({
            elem: '#signinTime'
            , type: 'time'
        });
        laydate.render({
            elem: '#sigoutTime'
            , type: 'time'
        });
    })

</script>